-- GENERATED SPELL FOR [Durnholde Rifleman] --


function spell0_17820(pUnit, Event) --@Multi-Shot,n/a--
pUnit:FullCastSpellOnTarget(31942,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17820', 525, 1)
end

function spell1_17820(pUnit, Event) --@Multi-Shot,n/a--
pUnit:FullCastSpellOnTarget(38383,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17820', 645, 1)
end

function spell2_17820(pUnit, Event) --@Shoot,n/a--
pUnit:FullCastSpellOnTarget(16100,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17820', 559, 1)
end

function spell3_17820(pUnit, Event) --@Shoot,n/a--
pUnit:FullCastSpellOnTarget(22907,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17820', 529, 1)
end

function Sorts_17820(pUnit, Event)
local choix_sorts_17820 = math.random(0, 3)
if choix_sorts_17820 == 0 then
pUnit:RegisterEvent('spell0_17820', 1, 1)
end
if choix_sorts_17820 == 1 then
pUnit:RegisterEvent('spell1_17820', 1, 1)
end
if choix_sorts_17820 == 2 then
pUnit:RegisterEvent('spell2_17820', 1, 1)
end
if choix_sorts_17820 == 3 then
pUnit:RegisterEvent('spell3_17820', 1, 1)
end
end

function mob17820_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_17820', math.random(1500, 3000), 1)
end

function mob17820_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17820_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17820_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(17820, 1, 'mob17820_Action')
RegisterUnitEvent(17820, 2, 'mob17820_Leave')
RegisterUnitEvent(17820, 3, 'mob17820_Kill')
RegisterUnitEvent(17820, 4, 'mob17820_Die')
